package com.farm.work.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.farm.work.mapper.WorkMapper;
import com.farm.work.domain.Work;
import com.farm.work.service.IWorkService;

/**
 * 日程安排Service业务层处理
 * 
 * @author yd
 * @date 2024-03-12
 */
@Service
public class WorkServiceImpl implements IWorkService 
{
    @Autowired
    private WorkMapper workMapper;

    /**
     * 查询日程安排
     * 
     * @param workId 日程安排主键
     * @return 日程安排
     */
    @Override
    public Work selectWorkByWorkId(Long workId)
    {
        return workMapper.selectWorkByWorkId(workId);
    }

    /**
     * 查询日程安排列表
     * 
     * @param work 日程安排
     * @return 日程安排
     */
    @Override
    public List<Work> selectWorkList(Work work)
    {
        return workMapper.selectWorkList(work);
    }

    /**
     * 新增日程安排
     * 
     * @param work 日程安排
     * @return 结果
     */
    @Override
    public int insertWork(Work work)
    {
        return workMapper.insertWork(work);
    }

    /**
     * 修改日程安排
     * 
     * @param work 日程安排
     * @return 结果
     */
    @Override
    public int updateWork(Work work)
    {
        return workMapper.updateWork(work);
    }

    /**
     * 批量删除日程安排
     * 
     * @param workIds 需要删除的日程安排主键
     * @return 结果
     */
    @Override
    public int deleteWorkByWorkIds(Long[] workIds)
    {
        return workMapper.deleteWorkByWorkIds(workIds);
    }

    /**
     * 删除日程安排信息
     * 
     * @param workId 日程安排主键
     * @return 结果
     */
    @Override
    public int deleteWorkByWorkId(Long workId)
    {
        return workMapper.deleteWorkByWorkId(workId);
    }
}
